setupRabbit: expose empty-bin systematic clipping/zeroing#708
Merged
davidwalter2 merged 2 commits intoJul 21, 2026
Conversation
Add two opt-in CLI flags (both off by default) that forward to the rabbit TensorWriter knobs of the same name: - --clipSystVariations X: clip each bin's log_normal up/down factor to [1/X, X]. - --zeroSystLowNeff X (+ --zeroSystLowNeffProcs): zero every systematic's logk in any (bin, process) with n_eff = sumw^2/sumw2 < X. Tames the ~1e15-1e20 blow-ups from mixed-sign NLO weight-cancellation-residual bins in thin backgrounds (Ztautau/PhotonInduced/Other) that break debug/plot tools. The new knobs are forwarded to TensorWriter only when actually set, so this script remains compatible with rabbit versions predating them. Using the flags requires a rabbit with these TensorWriter arguments (WMass/rabbit#146). Co-Authored-By: Claude Opus 4.8 <[email protected]>
lucalavezzo
force-pushed
the
setuprabbit-empty-bin-systematics
branch
from
July 21, 2026 20:21
dc74bcb to
283fa06
Compare
Collaborator
|
I think you should also update the rabbit submodule |
WMass/rabbit#146 is merged (5a01cb4), adding the TensorWriter clip_syst_variations / zero_syst_low_neff arguments that the new setupRabbit flags forward to. Bumps the pin 948a94a -> 5a01cb4 (only WMass#146 in between) so --clipSystVariations / --zeroSystLowNeff are usable. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two opt-in
setupRabbit.pyCLI flags (both off by default) that forward to the rabbitTensorWriterknobs of the same name (WMass/rabbit#146):--clipSystVariations X— clip each bin's log-normal up/down factor to[1/X, X].--zeroSystLowNeff X(+--zeroSystLowNeffProcs) — zero every systematic'slogkin any(bin, process)whose effective sample sizen_eff = sumw^2/sumw2is belowX.Motivation
In dense log-normal Z datacards, thin backgrounds (Ztautau, PhotonInduced, Other) have bins whose nominal is a mixed-sign NLO weight-cancellation residual, giving
n_eff << 1. Therelogk = log(syst/nom)is floating-point noise andnom*exp(logk)blows up to ~1e15–1e20, whichdebug_inputdataflags and which makesrabbit_plot_inputdataexplode. These flags tame that at build time;--zeroSystLowNeffadditionally cleans the card so the debug/plot tools come out clean. The signal (Zmumu) has no low-n_effbins, so the all-process default is safe.Dependency
Requires WMass/rabbit#146 (the
TensorWriterclip_syst_variations/zero_syst_low_neffkwargs).Validation
A real 4D Z card rebuilt with
--zeroSystLowNeff 1is byte-identical to an independent post-hoc reference across every dataset (hnorm/hsumw/hsumw2/hdata_obs/hlogk).🤖 Generated with Claude Code